﻿@model IUserAgent
@using SmartStore.Services.Common
@{
    ViewBag.Title = "User Agent Tester";
	var ua = Model;
}

<div class="section-header">
    <div class="title">
        <i class="fa fa-mobile-alt"></i>
        User Agent Tester
    </div>
</div>

<div style="max-width: 800px">
	@using (Html.BeginForm(null, null, FormMethod.Get))
	{
		<div>
			@Html.TextArea("ua", ua.RawValue, new { @class = "form-control" })
			<button type="submit" class="btn btn-secondary mt-3">Test</button>
		</div>

		<div class="mt-4">
			OS: <strong>@ua.OS.Family</strong> (@ua.OS)<br />
			User Agent: <strong>@ua.UserAgent.Family</strong>, (@ua.UserAgent)<br />
			Device: <strong>@ua.Device.Family</strong>, (@ua.Device)<br />
			<br />
			IsBot: <span style='font-weight:@(ua.IsBot ? "bold" : "normal")'>@ua.IsBot</span><br />
			IsMobileDevice: <span style='font-weight:@(ua.IsMobileDevice ? "bold" : "normal")'>@ua.IsMobileDevice</span><br />
			IsTablet: <span style='font-weight:@(ua.IsTablet ? "bold" : "normal")'>@ua.IsTablet</span><br />
			IsPdfConverter: <span style='font-weight:@(ua.IsPdfConverter ? "bold" : "normal")'>@ua.IsPdfConverter</span><br />
		</div>
	}
</div>





